home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS in a Box 7
/
BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso
/
Files
/
Prog
/
T
/
TC Prog Guide.cpt
/
picture ƒ
/
trans.h
< prev
Wrap
Text File
|
1990-11-08
|
2KB
|
76 lines
/*
* FILE: trans.h
* AUTHOR: R. Gonzalez
* CREATED: October 3, 1990
*
* Defines 3D transformation (using trans. matrix) for picture
* application.
*/
# ifndef trans_h
# define trans_h
# include "class.h"
# define PI 3.1415926
/******************************************************************
* abstract transformation
******************************************************************/
struct Transformation:Generic_Class
{
double m[4][4]; /* public */
boolean init(void);
virtual void combine(Transformation*,Transformation*);
virtual void equate(Transformation*);
};
/******************************************************************
* translation
******************************************************************/
struct Translation:Transformation
{
virtual void set(double,double,double);
};
/******************************************************************
* scaling
******************************************************************/
struct Scaling:Transformation
{
virtual void set(double,double,double);
};
/******************************************************************
* rotation about x
******************************************************************/
struct Rotation_X:Transformation
{
virtual void set(double);
};
/******************************************************************
* rotation about y
******************************************************************/
struct Rotation_Y:Transformation
{
virtual void set(double);
};
/******************************************************************
* rotation about z
******************************************************************/
struct Rotation_Z:Transformation
{
virtual void set(double);
};
/******************************************************************
* convert from world to camera coordinates
******************************************************************/
struct World_To_Camera:Transformation
{
virtual void set(double,double,double,double,double,double);
};
# endif